package reflect;

public class ArgsDemo {
    public static void main(String[] args) {
        //变长参数只能是一个方法的最后一个参数
        //变长参数是编译器认可的，最终编译后会被改为数组
        dosome(1);
        dosome(1,"one");
        dosome(1,"one","two");
        dosome(1,"one","two","three");
        dosome(1,"one","two","three","four");
        dosome(1,"one","two","three","four","five");




    }
    //public static void dosome(int a,String[]args){
    public static void dosome(int a,String...args){
        System.out.println(args.length);
    }
}
